package com.treepoke.util.base;

import com.treepoke.util.exception.EntityAccessException;
import java.util.Collection;


/**
 * Interfaz que define las firmas de los metodos básicos para los EAOs(insert,
 * delete, update, findByPrimaryKey, findByFilter, getAll)
 */
public interface TPBaseEAO<B extends TPBaseEntity> {

    public B insert(B data) throws EntityAccessException;

    public void delete(B llave) throws EntityAccessException;

    public B findByPrimaryKey(B llave) throws EntityAccessException;

    public B update(B data) throws EntityAccessException;

    public Collection<B> getAll() throws EntityAccessException;

    public Collection<B> findByFilter(B filter) throws EntityAccessException;
}
